$OpenBSD: patch-interfac_main_cc,v 1.2 2017/04/18 08:54:17 fcambus Exp $
--- interfac/main.cc.orig	Mon Jul 16 19:19:36 2007
+++ interfac/main.cc	Tue Apr 18 08:58:02 2017
@@ -12,10 +12,11 @@
 #include "interfac.h"
 
 #ifdef USE_NEWHANDLER
-# include <new.h>
+# include <new>
 #endif
 
 #include <locale.h>
+#include <unistd.h>
 
 Interface *ui = 0;
 const chtype *ColorArray = 0;
@@ -40,7 +41,7 @@ ErrorType::ErrorType()
 	srand((unsigned) starttime);
 
 #ifdef USE_NEWHANDLER
-	set_new_handler(memError);
+	std::set_new_handler(memError);
 #endif
 	origdir = mygetcwd();
 }
@@ -95,6 +96,11 @@ int main(int argc, char **argv)
 	int ARGC = argc;
 
 	setlocale(LC_ALL, "");
+
+	if (pledge("stdio tty cpath rpath wpath fattr proc exec", NULL) == -1) {
+		perror("pledge");
+		exit(EXIT_FAILURE);
+	}
 
 	while ((ARGC > 2) && ('-' == ARGV[1][0])) {
 		char *resName = ARGV[1] + 1;
